﻿using Microsoft.EntityFrameworkCore;
using QRCodePass.Core.Models;

namespace QRCodePass.EntityFrameworkCore.Extensions
{
    public static class ModelBuilderExtensions
    {
        public static void Seed(this ModelBuilder modelBuilder)
        {
            ///指定实体在数据库中生成的名称。
            modelBuilder.Entity<Process>().ToTable("Process", "QRCodePass");
            // modelBuilder.Entity<Person>().ToTable("Person");
            modelBuilder.Entity<Student>().ToTable("Student", "QRCodePass");
            modelBuilder.Entity<Department>().ToTable("Department", "QRCodePass");
            modelBuilder.Entity<Build>().ToTable("Build", "QRCodePass");


            //modelBuilder.Entity<Blog>().ToTable("Blogs").HasKey(a => a.Id);
            //modelBuilder.Entity<Blog>().Property(a => a.Title).HasMaxLength(50).HasColumnName("BlogTitle");

        }
    }
}